<?php
include("weatherApi.php");

$WA = new WeatherApi('nanjing');
$weather = $WA -> get_current_weather();
$forecast = $WA -> get_forecast_weather();

if ($weather)
{
	echo '<pre>';
	var_dump($weather);
	echo '</pre>';
}
else
{
	echo '无法获取当前天气信息，请检查网络。';
}

if ($forecast)
{
	echo '<pre>';
	var_dump($forecast);
	echo '</pre>';
}
else
{
	echo '无法获取天气预报信息，请检查网络。';
}


?>
